package com.zm.duotai;

public class Salesman extends Person {
    private int saleRoom;
    private double monSal;
    private int no;

    public Salesman() {
    }
   // 兼职推销人员的月薪按当月的销售额的4%提成
    public Salesman(String name, int age, char genger, long sid, int length, int weight,int saleRoom) {
        super(name,age,genger,sid,length,weight);
        this.saleRoom = saleRoom;
        this.monSal=saleRoom*0.04;
        Person.setNo(Person.getNo()+1);
        this.no=Person.getNo();
    }
    @Override
    public String toString() {
        return "Person{" +
                "name='" + super.getName() + '\'' +
                ", age=" + super.getAge() +
                ", genger=" + super.getGenger() +
                ", no=" + this.no +
                ", sid=" + super.getSid() +
                ", length=" + super.getLength() +
                ", weight=" + super.getWeight() +
                ", monSal=" +this.monSal +
                '}';
    }
}
